#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
    FILE *pf = fopen("test.ini","r+");
    if (NULL == pf)
        exit(-1);

    char name[1024];
    scanf("%s",name);

    char buf[1024];
    fgets(buf,1024,pf);    // \t

    char *p = buf;
    while(*p) p++;
    p --;

    while (*p == '\t')
    {
        *p = '\0';
        p--;
    }

    if(strcmp(name, buf) == 0)
    {
        printf("欢迎登录!\n");
    }
    else {
        printf("欢迎失败!\n");
    }

    return 0;
}
